
#include "StdAfx.h"
#include "ScintillaEdit.h"

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
ScintillaEdit::ScintillaEdit()
: CWnd()
{
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
BOOL ScintillaEdit::Attach(HWND hwnd)
{
  static const char *scintillaStr = "Scintilla";
  static const int maxChars = 16;
  char className[maxChars];                       // Only need enough to match "Scintilla".
  if (hwnd)
  {
    // Get the name of the class used by the hwnd.
    GetClassName(hwnd, className, maxChars);
    // Now ensure it's of the right type.
    if (_stricmp(className, scintillaStr) == 0)
    {
      return CWnd::Attach(hwnd);
    }
  }

  return FALSE;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::GetText(int maxChars, char *text)
{
  SendMessage(SCI_GETTEXT, (WPARAM)maxChars, (LPARAM)text);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetText(const char *text)
{
  SendMessage(SCI_SETTEXT, (WPARAM)0, (LPARAM)text);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetSavePoint()
{
  SendMessage(SCI_SETSAVEPOINT);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::GetLine(int line, char *text)
{
  SendMessage(SCI_GETLINE, (WPARAM)line, (LPARAM)text);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::ReplaceSelection(const char *text)
{
  SendMessage(SCI_REPLACESEL, (WPARAM)0, (LPARAM)text);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetReadOnly()
{
  return (SendMessage(SCI_GETREADONLY) != 0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetReadOnly(bool readOnly)
{
  SendMessage(SCI_SETREADONLY, (WPARAM)readOnly);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::GetTextRange(TextRange &textRange)
{
  SendMessage(SCI_GETTEXTRANGE, (WPARAM)0, (LPARAM)&textRange);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::GetStyledText(TextRange &textRange)
{
  SendMessage(SCI_GETSTYLEDTEXT, (WPARAM)0, (LPARAM)&textRange);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AddText(int length, char *text)
{
  SendMessage(SCI_ADDTEXT, (WPARAM)length, (LPARAM)text);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AddStyledText(int length, char *text)
{
  SendMessage(SCI_ADDSTYLEDTEXT, (WPARAM)length, (LPARAM)text);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AppendText(int length, char *text)
{
  SendMessage(SCI_APPENDTEXT, (WPARAM)length, (LPARAM)text);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::InsertText(int pos, const char *text)
{
  SendMessage(SCI_INSERTTEXT, (WPARAM)pos, (LPARAM)text);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::ClearAll()
{
  SendMessage(SCI_CLEARALL);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::ClearDocumentStyle()
{
  SendMessage(SCI_CLEARDOCUMENTSTYLE);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
char ScintillaEdit::GetCharAt(int pos)
{
  return (char)SendMessage(SCI_GETCHARAT, (WPARAM)pos);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
char ScintillaEdit::GetStyleAt(int pos)
{
  return (char)SendMessage(SCI_GETSTYLEAT, (WPARAM)pos);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetStyleBits(int bits)
{
  SendMessage(SCI_SETSTYLEBITS, (WPARAM)bits);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetStyleBits()
{
  return (int)SendMessage(SCI_GETSTYLEBITS);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::FindText(int searchFlags, TextToFind &ttf)
{
  return (int)SendMessage(SCI_FINDTEXT, (WPARAM)searchFlags, (LPARAM)&ttf);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetSearchAnchor()
{
  SendMessage(SCI_SEARCHANCHOR);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::SearchNext(int searchFlags, const char *forText)
{
  return (int)SendMessage(SCI_SEARCHNEXT, (WPARAM)searchFlags, (LPARAM)forText);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::SearchPrev(int searchFlags, const char *forText)
{
  return (int)SendMessage(SCI_SEARCHPREV, (WPARAM)searchFlags, (LPARAM)forText);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetTargetStart()
{
  return (int)SendMessage(SCI_GETTARGETSTART);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetTargetStart(int pos)
{
  SendMessage(SCI_SETTARGETSTART, (WPARAM)pos);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetTargetEnd()
{
  return (int)SendMessage(SCI_GETTARGETEND);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetTargetEnd(int pos)
{
  SendMessage(SCI_SETTARGETEND, (WPARAM)pos);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::ReplaceTarget(int length, const char *text)
{
  return (int)SendMessage(SCI_REPLACETARGET, (WPARAM)length, (LPARAM)text);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::ReplaceTargetRegularExpression(int length, const char *text)
{
  return (int)SendMessage(SCI_REPLACETARGETRE, (WPARAM)length, (LPARAM)text);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetSearchFlags()
{
  return (int)SendMessage(SCI_GETSEARCHFLAGS);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetSearchFlags(int flags)
{
  SendMessage(SCI_SETSEARCHFLAGS, (WPARAM)flags);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::SearchInTarget(int length, const char *text)
{
  return (int)SendMessage(SCI_SEARCHINTARGET, (WPARAM)length, (LPARAM)text);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetOverType()
{
  return (SendMessage(SCI_GETOVERTYPE) != 0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetOvertType(bool overType)
{
  SendMessage(SCI_SETOVERTYPE, (WPARAM)overType);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::Cut()
{
  SendMessage(SCI_CUT);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::Copy()
{
  SendMessage(SCI_COPY);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::Paste()
{
  SendMessage(SCI_PASTE);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::Clear()
{
  SendMessage(SCI_CLEAR);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::CanPaste()
{
  return SendMessage(SCI_CANPASTE) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetTextLength()
{
  return (int)SendMessage(SCI_GETTEXTLENGTH);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetLineCount()
{
  return (int)SendMessage(SCI_GETLINECOUNT);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetFirstVisibleLine()
{
  return (int)SendMessage(SCI_GETFIRSTVISIBLELINE);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetLinesOnScreen()
{
  return (int)SendMessage(SCI_LINESONSCREEN);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetModified()
{
  return SendMessage(SCI_GETMODIFY) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetSelection(int anchorPos, int currentPos)
{
  SendMessage(SCI_SETSEL, (WPARAM)anchorPos, (LPARAM)currentPos);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::GotoPos(int pos)
{
  SendMessage(SCI_GOTOPOS, (WPARAM)pos);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::GotoLine(int line)
{
  SendMessage(SCI_GOTOLINE, (WPARAM)line);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetCurrentPos()
{
  return (int)SendMessage(SCI_GETCURRENTPOS);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetCurrentPos(int pos)
{
  SendMessage(SCI_SETCURRENTPOS, (WPARAM)pos);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetAnchor()
{
  return (int)SendMessage(SCI_GETANCHOR);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetAnchor(int pos)
{
  SendMessage(SCI_SETANCHOR, (WPARAM)pos);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetSelectionStart()
{
  return (int)SendMessage(SCI_GETSELECTIONSTART);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetSelectionStart(int pos)
{
  SendMessage(SCI_SETSELECTIONSTART, (WPARAM)pos);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetSelectionEnd()
{
  return (int)SendMessage(SCI_GETSELECTIONEND);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetSelectionEnd(int pos)
{
  SendMessage(SCI_SETSELECTIONEND, (WPARAM)pos);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SelectAll()
{
  SendMessage(SCI_SELECTALL);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::LineFromPosition(int pos)
{
  return (int)SendMessage(SCI_LINEFROMPOSITION, (WPARAM)pos);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::PositionFromLine(int line)
{
  return (int)SendMessage(SCI_POSITIONFROMLINE, (WPARAM)line);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetLineEndPosition(int line)
{
  return (int)SendMessage(SCI_GETLINEENDPOSITION, (WPARAM)line);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetLineLength(int line)
{
  return (int)SendMessage(SCI_LINELENGTH, (WPARAM)line);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::GetSelectedText(char *text)
{
  SendMessage(SCI_GETSELTEXT, (WPARAM)0, (LPARAM)text);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::GetCurrentLine(int maxChars, char *text)
{
  SendMessage(SCI_GETCURLINE, (WPARAM)maxChars, (LPARAM)text);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::SelectionIsRectangle()
{
  return SendMessage(SCI_SELECTIONISRECTANGLE) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::MoveCaretInsideView()
{
  SendMessage(SCI_MOVECARETINSIDEVIEW);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::WordEndPosition(int position, bool onlyWordCharacters)
{
  return (int)SendMessage(SCI_WORDENDPOSITION, (WPARAM)position, (LPARAM)onlyWordCharacters);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::WordStartPosition(int position, bool onlyWordCharacters)
{
  return (int)SendMessage(SCI_WORDSTARTPOSITION, (WPARAM)position, (LPARAM)onlyWordCharacters);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::TextWidth(int styleNumber, char *text)
{
  return (int)SendMessage(SCI_TEXTWIDTH, (WPARAM)styleNumber, (LPARAM)text);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::TextHeight(int line)
{
  return (int)SendMessage(SCI_TEXTHEIGHT, (WPARAM)line);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetColumn(int pos)
{
  return (int)SendMessage(SCI_GETCOLUMN, (WPARAM)pos);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::PositionFromPoint(int x, int y)
{
  return (int)SendMessage(SCI_POSITIONFROMPOINT, (WPARAM)x, (LPARAM)y);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::PositionFromPointClose(int x, int y)
{
  return (int)SendMessage(SCI_POSITIONFROMPOINTCLOSE, (WPARAM)x, (LPARAM)y);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::PointXFromPosition(int pos)
{
  return (int)SendMessage(SCI_POINTXFROMPOSITION, (WPARAM)0, (LPARAM)pos);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::PointYFromPosition(int pos)
{
  return (int)SendMessage(SCI_POINTYFROMPOSITION, (WPARAM)0, (LPARAM)pos);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::HideSelection(bool hide)
{
  return SendMessage(SCI_HIDESELECTION, (WPARAM)hide) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::LineScroll(int column, int line)
{
  SendMessage(SCI_LINESCROLL, (WPARAM)column, (LPARAM)line);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::ScrollToCaret()
{
  SendMessage(SCI_SCROLLCARET);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetXCaretPolicy(int caretPolicy, int caretStop)
{
  SendMessage(SCI_SETXCARETPOLICY, (WPARAM)caretPolicy, (LPARAM)caretStop);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetYCaretPolicy(int caretPolicy, int caretStop)
{
  SendMessage(SCI_SETYCARETPOLICY, (WPARAM)caretPolicy, (LPARAM)caretStop);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetVisiblePolicy(int caretPolicy, int caretStop)
{
  SendMessage(SCI_SETVISIBLEPOLICY, (WPARAM)caretPolicy, (LPARAM)caretStop);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetHScrollBar()
{
  return SendMessage(SCI_GETHSCROLLBAR, (WPARAM)0, (LPARAM)0) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetHScrollBar(bool visible)
{
  SendMessage(SCI_SETHSCROLLBAR, (WPARAM)visible, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetXOffset()
{
  return (int)SendMessage(SCI_GETXOFFSET, (WPARAM)0, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetXOffset(int offset)
{
  SendMessage(SCI_SETXOFFSET, (WPARAM)offset, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetScrollWidth()
{
  return (int)SendMessage(SCI_GETSCROLLWIDTH, (WPARAM)0, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetScrollWidth(int pixelWidth)
{
  SendMessage(SCI_SETSCROLLWIDTH, (WPARAM)pixelWidth, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetEndAtLastLine()
{
  return SendMessage(SCI_GETENDATLASTLINE, (WPARAM)0, (LPARAM)0) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetEndAtLastLine(bool end)
{
  SendMessage(SCI_SETENDATLASTLINE, (WPARAM)end, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetWhiteSpaceMode()
{
  return (int)SendMessage(SCI_GETVIEWWS, (WPARAM)0, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetWhiteSpaceMode(int mode)
{
  SendMessage(SCI_SETVIEWWS, (WPARAM)mode, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetWhiteSpaceFGColour(bool useWhiteSpaceFGColour, int colour)
{
  SendMessage(SCI_SETWHITESPACEFORE, (WPARAM)useWhiteSpaceFGColour, (LPARAM)colour);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetWhiteSpaceBGColour(bool useWhiteSpaceBGColour, int colour)
{
  SendMessage(SCI_SETWHITESPACEBACK, (WPARAM)useWhiteSpaceBGColour, (LPARAM)colour);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetWhiteSpaceColour(bool useWhiteSpaceColour, int fgColour, int bgColour)
{
  SetWhiteSpaceFGColour(useWhiteSpaceColour, fgColour);
  SetWhiteSpaceBGColour(useWhiteSpaceColour, bgColour);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetCursorType()
{
  return (int)SendMessage(SCI_GETCURSOR);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetCursorType(int type)
{
  SendMessage(SCI_SETCURSOR, (WPARAM)type);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetMouseDownCaptures()
{
  return SendMessage(SCI_GETMOUSEDOWNCAPTURES) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetMouseDownCaptures(bool captures)
{
  SendMessage(SCI_SETMOUSEDOWNCAPTURES, (WPARAM)captures);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
ScintillaEdit::EOLMode ScintillaEdit::GetEOLMode()
{
  return (EOLMode)SendMessage(SCI_GETEOLMODE);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetEOLMode(EOLMode mode)
{
  SendMessage(SCI_SETEOLMODE, (WPARAM)mode);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::ConvertEOLs(int eolMode)
{
  SendMessage(SCI_SETMOUSEDOWNCAPTURES, (WPARAM)eolMode);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetViewEOL()
{
  return SendMessage(SCI_GETVIEWEOL) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetViewEOL(bool view)
{
  SendMessage(SCI_SETVIEWEOL, (WPARAM)view);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetEndStyled()
{
  return SendMessage(SCI_GETENDSTYLED) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StartStyling(int pos, int mask)
{
  SendMessage(SCI_STARTSTYLING, (WPARAM)pos, (LPARAM)mask);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetStyling(int length, int style)
{
  SendMessage(SCI_SETSTYLING, (WPARAM)length, (LPARAM)style);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetStylingEx(int length, const char *styles)
{
  SendMessage(SCI_SETSTYLINGEX, (WPARAM)length, (LPARAM)styles);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetLineState(int line)
{
  return (int)SendMessage(SCI_GETLINESTATE, (WPARAM)line);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetLineState(int line, int state)
{
  SendMessage(SCI_SETLINESTATE, (WPARAM)line, (LPARAM)state);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------

int ScintillaEdit::GetMaxLineState()
{
  return (int)SendMessage(SCI_GETMAXLINESTATE);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleResetDefault()
{
  SendMessage(SCI_STYLERESETDEFAULT);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleClearAll()
{
  SendMessage(SCI_STYLECLEARALL);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleSetFont(int styleNumber, char *fontName)
{
  SendMessage(SCI_STYLESETFONT, (WPARAM)styleNumber, (LPARAM)fontName);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleSetSize(int styleNumber, int pointSize)
{
  SendMessage(SCI_STYLESETSIZE, (WPARAM)styleNumber, (LPARAM)pointSize);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleSetBold(int styleNumber, bool bold)
{
  SendMessage(SCI_STYLESETBOLD, (WPARAM)styleNumber, (LPARAM)bold);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleSetItalic(int styleNumber, bool italic)
{
  SendMessage(SCI_STYLESETITALIC, (WPARAM)styleNumber, (LPARAM)italic);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleSetUnderline(int styleNumber, bool underline)
{
  SendMessage(SCI_STYLESETUNDERLINE, (WPARAM)styleNumber, (LPARAM)underline);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleSetFont(int styleNumber, char *fontName, int pointSize, bool bold, bool italic, bool underline)
{
  StyleSetFont(styleNumber, fontName);
  StyleSetSize(styleNumber, pointSize);
  StyleSetBold(styleNumber, bold);
  StyleSetItalic(styleNumber, italic);
  StyleSetUnderline(styleNumber, underline);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleSetFGColour(int styleNumber, int colour)
{
  SendMessage(SCI_STYLESETFORE, (WPARAM)styleNumber, (LPARAM)colour);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleSetBGColour(int styleNumber, int colour)
{
  SendMessage(SCI_STYLESETBACK, (WPARAM)styleNumber, (LPARAM)colour);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleSetColour(int styleNumber, int fgColour, int bgColour)
{
  StyleSetFGColour(styleNumber, fgColour);
  StyleSetBGColour(styleNumber, bgColour);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleSetEOLFilled(int styleNumber, bool eolFilled)
{
  SendMessage(SCI_STYLESETEOLFILLED, (WPARAM)styleNumber, (LPARAM)eolFilled);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleSetCharacterSet(int styleNumber, StyleCharSet charSet)
{
  SendMessage(SCI_STYLESETCHARACTERSET, (WPARAM)styleNumber, (LPARAM)charSet);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleSetCase(int styleNumber, StyleCaseMode mode)
{
  SendMessage(SCI_STYLESETCASE, (WPARAM)styleNumber, (LPARAM)mode);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleSetVisible(int styleNumber, bool visible)
{
  SendMessage(SCI_STYLESETVISIBLE, (WPARAM)styleNumber, (LPARAM)visible);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::StyleSetChangeable(int styleNumber, bool changeable)
{
  SendMessage(SCI_STYLESETCHANGEABLE, (WPARAM)styleNumber, (LPARAM)changeable);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetSelectionFGColour(bool useSelectionFGColour, int colour)
{
  SendMessage(SCI_SETSELFORE, (WPARAM)useSelectionFGColour, (LPARAM)colour);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetSelectionBGColour(bool useSelectionBGColour, int colour)
{
  SendMessage(SCI_SETSELBACK, (WPARAM)useSelectionBGColour, (LPARAM)colour);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetCaretColour()
{
  return (int)SendMessage(SCI_GETCARETFORE);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetCaretColour(int colour)
{
  SendMessage(SCI_SETCARETFORE, (WPARAM)colour);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetCaretLineVisible()
{
  return SendMessage(SCI_GETCARETLINEVISIBLE) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetCaretLineVisible(bool show)
{
  SendMessage(SCI_SETCARETLINEVISIBLE, (WPARAM)show);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetCaretLineColour()
{
  return (int)SendMessage(SCI_GETCARETLINEBACK);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetCaretLineColour(int colour)
{
  SendMessage(SCI_SETCARETLINEBACK, (WPARAM)colour);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetCaretPeriod()
{
  return (int)SendMessage(SCI_GETCARETPERIOD);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetCaretPeriod(int ms)
{
  SendMessage(SCI_SETCARETPERIOD, (WPARAM)ms);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetCaretWidth()
{
  return (int)SendMessage(SCI_GETCARETWIDTH);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetCaretWidth(int pixels)
{
  SendMessage(SCI_SETCARETWIDTH, (WPARAM)pixels);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetControlCharSymbol()
{
  return (int)SendMessage(SCI_GETCONTROLCHARSYMBOL);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetControlCharSymbol(int symbol)
{
  SendMessage(SCI_SETCONTROLCHARSYMBOL, (WPARAM)symbol);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetMarginType(Margin margin)
{
  return (int)SendMessage(SCI_GETMARGINTYPEN, (WPARAM)margin);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetMarginType(Margin margin, int iType)
{
  SendMessage(SCI_SETMARGINTYPEN, (WPARAM)margin, (LPARAM)iType);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetMarginWidth(Margin margin)
{
  return (int)SendMessage(SCI_GETMARGINWIDTHN, (WPARAM)margin);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetMarginWidth(Margin margin, int pixelWidth)
{
  SendMessage(SCI_SETMARGINWIDTHN, (WPARAM)margin, (LPARAM)pixelWidth);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetMarginMask(Margin margin)
{
  return (int)SendMessage(SCI_GETMARGINMASKN, (WPARAM)margin);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetMarginMask(Margin margin, int mask)
{
  SendMessage(SCI_SETMARGINMASKN, (WPARAM)margin, (LPARAM)mask);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetMarginSensitive(Margin margin)
{
  return SendMessage(SCI_GETMARGINSENSITIVEN, (WPARAM)margin) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetMarginSensitive(Margin margin, bool sensitive)
{
  SendMessage(SCI_SETMARGINSENSITIVEN, (WPARAM)margin, (LPARAM)sensitive);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetMarginLeft()
{
  return (int)SendMessage(SCI_GETMARGINLEFT);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetMarginRight()
{
  return (int)SendMessage(SCI_GETMARGINRIGHT);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetMarginLeft(int pixels)
{
  SendMessage(SCI_SETMARGINLEFT, (WPARAM)0, (LPARAM)pixels);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetMarginRight(int pixels)
{
  SendMessage(SCI_SETMARGINRIGHT, (WPARAM)0, (LPARAM)pixels);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetUsePalette()
{
  return SendMessage(SCI_GETUSEPALETTE) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetUszePalette(bool allowPalette)
{
  SendMessage(SCI_SETUSEPALETTE, (WPARAM)allowPalette);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetBufferedDraw()
{
  return SendMessage(SCI_GETBUFFEREDDRAW) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetBufferedDraw(bool buffer)
{
  SendMessage(SCI_SETBUFFEREDDRAW, (WPARAM)buffer);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::GetCodePage()
{
  return (int)SendMessage(SCI_GETCODEPAGE);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetCodePage(int codePage)
{
  SendMessage(SCI_SETCODEPAGE, (WPARAM)codePage);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetWordChars(const char *chars)
{
  SendMessage(SCI_SETWORDCHARS, (WPARAM)0, (LPARAM)chars);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::GrabFocus()
{
  SendMessage(SCI_GRABFOCUS, (WPARAM)0, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::GetFocus()
{
  SendMessage(SCI_GETFOCUS, (WPARAM)0, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetFocus(bool focus)
{
  SendMessage(SCI_SETFOCUS, (WPARAM)focus, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::BraceHighlight(int pos1, int pos2)
{
  SendMessage(SCI_BRACEHIGHLIGHT, (WPARAM)pos1, (LPARAM)pos2);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::BraceBadLight(int pos)
{
  SendMessage(SCI_BRACEBADLIGHT, (WPARAM)pos, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int ScintillaEdit::BraceMatch(int pos, int maxReStyle)
{
  return (int)SendMessage(SCI_BRACEMATCH, (WPARAM)pos, (LPARAM)maxReStyle);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::GetTabWidth()
{
  return (int)SendMessage(SCI_GETTABWIDTH, (WPARAM)0, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetTabWidth(int numChars)
{
  SendMessage(SCI_SETTABWIDTH, (WPARAM)numChars, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetUseTabs()
{
  return SendMessage(SCI_GETUSETABS, (WPARAM)0, (LPARAM)0) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetUseTabs(bool useTabs)
{
  SendMessage(SCI_SETUSETABS, (WPARAM)useTabs, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::GetIndent()
{
  return (int)SendMessage(SCI_GETINDENT, (WPARAM)0, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetIndent(int numChars)
{
  SendMessage(SCI_SETINDENT, (WPARAM)numChars, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetTabIndents()
{
  return SendMessage(SCI_GETTABINDENTS, (WPARAM)0, (LPARAM)0) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetTabIndents(bool tabIndents)
{
  SendMessage(SCI_SETTABINDENTS, (WPARAM)tabIndents, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetBackSpaceUnindents()
{
  return SendMessage(SCI_GETBACKSPACEUNINDENTS, (WPARAM)0, (LPARAM)0) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetBackSpaceUnindents(bool unindents)
{
  SendMessage(SCI_SETBACKSPACEUNINDENTS, (WPARAM)unindents, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::GetLineIndentation(int line)
{
  return (int)SendMessage(SCI_GETLINEINDENTATION, (WPARAM)line, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetLineIndentation(int line, int indentation)
{
  SendMessage(SCI_SETLINEINDENTATION, (WPARAM)line, (LPARAM)indentation);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::GetLineIndentPosition(int line)
{
  return (int)SendMessage(SCI_GETLINEINDENTPOSITION, (WPARAM)line, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::GetIndentationGuides()
{
  return SendMessage(SCI_GETINDENTATIONGUIDES, (WPARAM)0, (LPARAM)0) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetIndentationGuides(bool view)
{
  SendMessage(SCI_SETINDENTATIONGUIDES, (WPARAM)view, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::GetHighlightGuide()
{
  return (int)SendMessage(SCI_GETHIGHLIGHTGUIDE, (WPARAM)0, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetHighlightGuide(int column)
{
  SendMessage(SCI_SETHIGHLIGHTGUIDE, (WPARAM)column, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::MarkerDefine(int markerNumber, MarkerSymbol marker)
{
  SendMessage(SCI_MARKERDEFINE, (WPARAM)markerNumber, (LPARAM)marker);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::MarkerSetFGColour(int markerNumber, int colour)
{
  SendMessage(SCI_MARKERSETFORE, (WPARAM)markerNumber, (LPARAM)colour);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::MarkerSetGGColour(int markerNumber, int colour)
{
  SendMessage(SCI_MARKERSETBACK, (WPARAM)markerNumber, (LPARAM)colour);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::MarkerAdd(int line, int markerNumber)
{
  return (int)SendMessage(SCI_MARKERADD, (WPARAM)line, (LPARAM)markerNumber);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::MarkerDelete(int line, int markerNumber)
{
  SendMessage(SCI_MARKERDELETE, (WPARAM)line, (LPARAM)markerNumber);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::MarkerDeleteAll(int markerNumber)
{
  SendMessage(SCI_MARKERDELETEALL, (WPARAM)markerNumber);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::MarkerGet(int line)
{
  return (int)SendMessage(SCI_MARKERGET, (WPARAM)line, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::MarkerNext(int lineStart, int markerMask)
{
  return (int)SendMessage(SCI_MARKERNEXT, (WPARAM)lineStart, (LPARAM)markerMask);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::MarkerPrev(int lineStart, int markerMask)
{
  return (int)SendMessage(SCI_MARKERPREVIOUS, (WPARAM)lineStart, (LPARAM)markerMask);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::MarkerLineFromHandle(int markerHandle)
{
  return (int)SendMessage(SCI_MARKERLINEFROMHANDLE, (WPARAM)markerHandle, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::MarkerDeleteFromHandle(int markerHandle)
{
  SendMessage(SCI_MARKERDELETEHANDLE, (WPARAM)markerHandle, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::MarkerDefinePixMap(int markerNumber, const char *xpm)
{
  SendMessage(SCI_MARKERDEFINEPIXMAP, (WPARAM)markerNumber, (LPARAM)xpm);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::IndicatorSetStyle(int indicatorNumber, int indicatorStyle)
{
  SendMessage(SCI_INDICSETSTYLE, (WPARAM)indicatorNumber, (LPARAM)indicatorStyle);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::IndicatorGetStyle(int indicatorNumber)
{
  return (int)SendMessage(SCI_INDICGETSTYLE, (WPARAM)indicatorNumber, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::GetIndicatorFGColour(int indicatorNumber)
{
  return (int)SendMessage(SCI_INDICGETFORE, (WPARAM)indicatorNumber, (LPARAM)0);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetIndicatorFGColour(int indicatorNumber, int colour)
{
  SendMessage(SCI_INDICSETFORE, (WPARAM)indicatorNumber, (LPARAM)colour);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AutoCompleteShow(int lenEntered, const char *list)
{
  SendMessage(SCI_AUTOCSHOW, (WPARAM)lenEntered, (LPARAM)list);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AutoCompleteCancel()
{
  SendMessage(SCI_AUTOCCANCEL);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::AutoCompleteActive()
{
  return SendMessage(SCI_AUTOCACTIVE) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::AutoCompletePosStart()
{
  return (int)SendMessage(SCI_AUTOCPOSSTART);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AutoComplete()
{
  SendMessage(SCI_AUTOCCOMPLETE);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AutoCompleteStops(const char *chars)
{
  SendMessage(SCI_AUTOCSTOPS, (WPARAM)0, (LPARAM)chars);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
char ScintillaEdit::AutoCompleteGetSeparator()
{
  return (char)SendMessage(SCI_AUTOCGETSEPARATOR);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AutoCompleteSetSeparator(char separator)
{
  SendMessage(SCI_AUTOCSETSEPARATOR, (WPARAM)separator);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AutoCompleteSelect(const char *select)
{
  SendMessage(SCI_AUTOCSELECT, (WPARAM)0, (LPARAM)select);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::AutoCompleteGetCancelAtStart()
{
  return SendMessage(SCI_AUTOCGETCANCELATSTART) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AutoCompleteSetCancelAtStart(bool cancel)
{
  SendMessage(SCI_AUTOCSETCANCELATSTART, (WPARAM)cancel);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AutoCompleteSetFillUps(const char *chars)
{
  SendMessage(SCI_AUTOCSETFILLUPS, (WPARAM)0, (LPARAM)chars);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::AutoCompleteGetChooseSingle()
{
  return SendMessage(SCI_AUTOCGETCHOOSESINGLE) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AutoCompleteSetChooseSingle(bool single)
{
  SendMessage(SCI_AUTOCSETCHOOSESINGLE, (WPARAM)single);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::AutoCompleteGetIgnoreCase()
{
  return SendMessage(SCI_AUTOCGETIGNORECASE) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AutoCompleteSetIgnoreCase(bool ignore)
{
  SendMessage(SCI_AUTOCSETIGNORECASE, (WPARAM)ignore);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::AutoCompleteGetAutoHide()
{
  return SendMessage(SCI_AUTOCGETAUTOHIDE) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AutoCompleteSetAutoHide(bool autoHide)
{
  SendMessage(SCI_AUTOCSETAUTOHIDE, (WPARAM)autoHide);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::AutoCompleteGetDropRestOfWord()
{
  return SendMessage(SCI_AUTOCGETDROPRESTOFWORD) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AutoCompleteSetDropRestOfWord(bool drop)
{
  SendMessage(SCI_AUTOCSETDROPRESTOFWORD, (WPARAM)drop);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::UserListShow(int listType, const char *list)
{
  SendMessage(SCI_USERLISTSHOW, (WPARAM)listType, (LPARAM)list);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::CallTipShow(int posStart, const char *definition)
{
  SendMessage(SCI_CALLTIPSHOW, (WPARAM)posStart, (LPARAM)definition);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::CallTipCancel()
{
  SendMessage(SCI_CALLTIPCANCEL);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
bool ScintillaEdit::CallTipActive()
{
  return SendMessage(SCI_CALLTIPACTIVE) != 0;
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::CallTipPosStart()
{
  return (int)SendMessage(SCI_CALLTIPPOSSTART);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::CallTipSetHighlight(int hlStart, int hlEnd)
{
  SendMessage(SCI_CALLTIPSETHLT, (WPARAM)hlStart, (LPARAM)hlEnd);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::CallTipSetBGColour(int colour)
{
  SendMessage(SCI_CALLTIPSETBACK, (WPARAM)colour);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::AssignCommandKey(int keyDefinition, int sciCommand)
{
  SendMessage(SCI_ASSIGNCMDKEY, (WPARAM)keyDefinition, (LPARAM)sciCommand);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::ClearCommandKey(int keyDefinition)
{
  SendMessage(SCI_CLEARCMDKEY, (WPARAM)keyDefinition);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::ClearAllCommandKeys()
{
  SendMessage(SCI_CLEARALLCMDKEYS);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::UsePopup(bool enable)
{
  SendMessage(SCI_USEPOPUP, (WPARAM)enable);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::MarcroStartRecord()
{
  SendMessage(SCI_STARTRECORD);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::MarcoStopRecord()
{
  SendMessage(SCI_STOPRECORD);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::PrintFormatRange()
{
  SendMessage(SCI_FORMATRANGE);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::GetPrintMagnification()
{
  return (int)SendMessage(SCI_GETPRINTMAGNIFICATION);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetPrintMagnification(int magnification)
{
  SendMessage(SCI_SETPRINTMAGNIFICATION, (WPARAM)magnification);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::GetPrintColourMode()
{
  return (int)SendMessage(SCI_GETPRINTCOLOURMODE);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetPrintColourMode(int mode)
{
  SendMessage(SCI_SETPRINTCOLOURMODE, (WPARAM)mode);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
ScintillaEdit::WrapMode ScintillaEdit::GetWrapMode()
{
  return (WrapMode)SendMessage(SCI_GETWRAPMODE);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetWrapMode(WrapMode mode)
{
  SendMessage(SCI_SETWRAPMODE, (WPARAM)mode);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
ScintillaEdit::LayoutCache ScintillaEdit::GetLayoutCache()
{
  return (LayoutCache)SendMessage(SCI_GETLAYOUTCACHE);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetLayoutCache(LayoutCache cache)
{
  SendMessage(SCI_SETLAYOUTCACHE, (WPARAM)cache);
}

void ScintillaEdit::ZoomIn()
{
  SendMessage(SCI_ZOOMIN);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::ZoomOut()
{
  SendMessage(SCI_ZOOMOUT);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::GetZoom()
{
  return (int)SendMessage(SCI_GETZOOM);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetZoom(int zoom)
{
  SendMessage(SCI_SETZOOM, (WPARAM)zoom);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::GetEdgeColumn()
{
  return (int)SendMessage(SCI_GETEDGECOLUMN);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetEdgeColumn(int column)
{
  SendMessage(SCI_SETEDGECOLUMN, (WPARAM)column);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
ScintillaEdit::EdgeMode ScintillaEdit::GetEdgeMode()
{
  return (EdgeMode)SendMessage(SCI_GETEDGEMODE);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetEdgeMode(EdgeMode mode)
{
  SendMessage(SCI_SETEDGEMODE, (WPARAM)mode);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::GetEdgeColour()
{
  return (int)SendMessage(SCI_GETEDGECOLOUR);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetEdgeColour(int colour)
{
  SendMessage(SCI_SETEDGECOLOUR, (WPARAM)colour);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
int  ScintillaEdit::GetLexer()
{
  return (int)SendMessage(SCI_GETLEXER);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetLexer(int lexer)
{
  SendMessage(SCI_SETLEXER, (WPARAM)lexer);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetLexerLanguage(char *name)
{
  SendMessage(SCI_SETLEXERLANGUAGE, (WPARAM)0, (LPARAM)name);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::Colourise(int start, int end)
{
  SendMessage(SCI_COLOURISE, (WPARAM)start, (LPARAM)end);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetProperty(char *key, char *value)
{
  SendMessage(SCI_SETPROPERTY, (WPARAM)key, (LPARAM)value);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
void ScintillaEdit::SetKeywords(int keywordSet, char *keywordList)
{
  SendMessage(SCI_SETKEYWORDS, (WPARAM)keywordSet, (LPARAM)keywordList);
}

//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
